-- GENERATED SPELL FOR [Shattered Hand Archer] --


function spell0_17427(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(30990,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17427', 587, 1)
end

function spell1_17427(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16100,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17427', 610, 1)
end

function spell2_17427(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17427', 541, 1)
end

function Sorts_17427(pUnit, Event)
local choix_sorts_17427 = math.random(0, 2)
if choix_sorts_17427 == 0 then
pUnit:RegisterEvent('spell0_17427', 1, 1)
end
if choix_sorts_17427 == 1 then
pUnit:RegisterEvent('spell1_17427', 1, 1)
end
if choix_sorts_17427 == 2 then
pUnit:RegisterEvent('spell2_17427', 1, 1)
end
end

function mob17427_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17427', math.random(1500, 3000), 1)
end

function mob17427_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17427_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17427_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17427, 1, 'mob17427_Action')
RegisterUnitEvent(17427, 2, 'mob17427_Leave')
RegisterUnitEvent(17427, 3, 'mob17427_Kill')
RegisterUnitEvent(17427, 4, 'mob17427_Die')
